import { Component } from '@/decorators';
import { Vue } from 'vue-class-component';
import { NavBar } from 'vant';

@Component({
  name: 'SecondaryLayout',
  render() {
    return (
      <div class="min-h-screen flex flex-col">
        <NavBar
          title={this.title}
          left-text="返回"
          left-arrow
          onClickLeft={() => this.$router.back()}
          fixed
          class="safe-area-inset-top"
        />
        <div class="flex-1 pt-[46px] safe-area-inset-top">
          <router-view />
        </div>
      </div>
    );
  }
})
export default class SecondaryLayout extends Vue {
  private get title() {
    return this.$route.meta.title || '';
  }
} 